<template>
	<view class="">
		<view class="center">
			<view class="title">人员总档案 <text>{{total}}</text> </view>

			<view class="list-card" v-for="(item,index) in showList" :key="index" @click="clickCard(item.name)">
				<view>{{item.name}}</view>
				<image class="image" src="@/static/image/right2.png"></image>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		Supervision
	} from '@/api/index.js';
	export default {
		data() {
			return {
				value: '',
				total:'',
				showList: []
			};
		},
		methods: {
			// 搜索功能
			iconClick() {
				console.log('就是玩')
			},
			clickCard(name) {
				uni.navigateTo({
					url: `/pages/supervision/archives/archivesList?name=${name}`,
				});
			},
			async init() {
				const res = await Supervision.getDepartmentFirst()
				console.log(res, 'res')
				this.showList = res.data.list
				this.total=res.data.total
			}
		},
		async onLoad() {
			await this.init()
		}
	}
</script>

<style lang="scss" scoped>
	::v-deep .uni-icons {
		margin-right: 20rpx;
	}

	::v-deep .uni-easyinput__content-input {
		font-size: 30rpx;
	}

	.top {
		// position: fixed;
		background-color: #FFFFFF;
		padding: 32rpx 20rpx;
	}

	.center {
		padding: 32rpx;

		.title {
			color: 30rpx;
			color: #2E73FC;
			font-weight: 400;
			margin-bottom: 32rpx;

			text {
				font-size: 40rpx;
				margin-left: 20rpx;
			}
		}

		.list-card {
			box-sizing: border-box;
			background-color: #FFFFFF;
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 40rpx 46rpx;
			font-size: 34rpx;
			font-weight: 400;
			color: #000623;
			border-radius: 12rpx;
			margin-bottom: 32rpx;

			.image {
				width: 16rpx;
				height: 34rpx;
			}
		}
	}
</style>
